|
XR API 2.4
|
Namespaces | |
| namespace | utility |
Functions | |
| SonyOzResult | LinkXrLibrary (SonyOzPlatformId platform_id) |
| Link the library and make the API available. | |
| void | UnlinkXrLibrary () |
| Terminate use of XR API and unlink the library. | |
| SonyOzResult | GetDeviceNum (SonyOzPlatformId platform_id, uint64_t *num) |
| Get the number of available devices. | |
| SonyOzResult | EnumerateDevices (SonyOzPlatformId platform_id, uint64_t size, SonyOzDeviceInfo *device_list) |
| Obtain information on available devices. | |
| SonyOzResult | SetDebugLogCallback (SonyOzPlatformId platform_id, SonyOzLogSettings_LogCallback callback) |
| Change the log output destination to the specified function. | |
| SonyOzResult | CreateSession (SonyOzPlatformId platform_id, const SonyOzDeviceInfo *device, RUNTIME_OPTION_BIT_FLAG runtime_option_bit_flag, PLATFORM_OPTION_BIT_FLAG platform_option_bit_flag, SonyOzSessionHandle *session) |
| Create session with XR Platform. | |
| SonyOzResult | DestroySession (SonyOzSessionHandle *session) |
| Destroy session with XR Platform. | |
| SonyOzResult | BeginSession (SonyOzSessionHandle session) |
| Start a session with the XR Platform. | |
| SonyOzResult | EndSession (SonyOzSessionHandle session) |
| Terminate the session with XR Platform. | |
| SonyOzResult | GetSessionState (SonyOzSessionHandle session, SonyOzSessionState *session_state) |
| Obtain session status. | |
| SonyOzResult | UpdateTrackingResultCache (SonyOzSessionHandle session) |
| Update the cache of tracking data.(for Game Thread) | |
| SonyOzResult | GetCachedPose (SonyOzSessionHandle session, SonyOzPoseId pose_id, SonyOzPosef *pose, bool *is_valid) |
| Obtain information about the camera. | |
| SonyOzResult | GetProjection (SonyOzSessionHandle session, SonyOzPoseId pose_id, SonyOzProjection *projection) |
| Obtain Projection. | |
| SonyOzResult | SubmitD3d11 (SonyOzSessionHandle session, ID3D11Device *device, ID3D11Texture2D *side_by_side, bool flip_y_position, ID3D11Texture2D *target) |
| Generate render textures and shaders for D3D11. (single pass) | |
| SonyOzResult | SubmitD3d12 (SonyOzSessionHandle session, ID3D12CommandQueue *command_queue, uint32_t node_mask, ID3D12Resource *side_by_side, bool flip_y_position, DXGI_FORMAT format, ID3D12Resource *target) |
| Generate render textures and shaders for D3D11. (single pass) | |
| SonyOzResult | SubmitOpengl (SonyOzSessionHandle session, unsigned int side_by_side, bool flip_y_position, unsigned int target) |
| Generate render textures and shaders for D3D11. (single pass) | |
| SonyOzResult | SubmitMultiPassD3d11 (SonyOzSessionHandle session, ID3D11Device *device, ID3D11Texture2D *left, ID3D11Texture2D *right, bool flip_y_position, ID3D11Texture2D *target) |
| Generate D3D11 render textures and shaders for off-screen rendering and shaders. (multi-pass) | |
| SonyOzResult | SubmitMultiPassD3d12 (SonyOzSessionHandle session, ID3D12CommandQueue *command_queue, uint32_t node_mask, ID3D12Resource *left, ID3D12Resource *right, bool flip_y_position, DXGI_FORMAT format, ID3D12Resource *target) |
| Generate D3D12 render textures and shaders for off-screen rendering and shaders. (multi-pass) | |
| SonyOzResult | SubmitMultiPassOpengl (SonyOzSessionHandle session, unsigned int left, unsigned int right, bool flip_y_position, unsigned int target) |
| Generate render textures and shaders for D3D11. (single pass) | |
| SonyOzResult | EnableStereo (SonyOzSessionHandle session, bool enable) |
| Enables/disables stereo rendering. | |
| SonyOzResult | GetTargetMonitorRectangle (SonyOzSessionHandle session, SonyOzRect *rect) |
| Obtain information on the target monitor. | |
| SonyOzResult | GetDisplaySpec (SonyOzSessionHandle session, SonyOzDisplaySpec *display_spec) |
| Obtain information about the display. | |
| SonyOzResult | GetXrSystemError (SonyOzSessionHandle session, SonyOzXrSystemError *error) |
| Obtain an error occurred in XR Runtime. | |
| SonyOzResult | GetXrSystemErrorNum (SonyOzSessionHandle session, uint16_t *num) |
| Obtain the number of errors occured in XR Runtime. | |
| SonyOzResult | GetXrSystemErrorList (SonyOzSessionHandle session, uint16_t num, SonyOzXrSystemError *errors) |
| Obtain errors occurred in XR Runtime. | |
| SonyOzResult | SetColorSpace (SonyOzSessionHandle session, int input_gamma_count, int output_gamma_count, float gamma) |
| SonyOzResult | SetCameraWindowEnabled (SonyOzPlatformId platform_id, SonyOzSessionHandle session, const bool enable) |
| Show/Hide camera window. | |
| SonyOzResult | GetPauseHeadPose (SonyOzPlatformId platform_id, SonyOzSessionHandle session, bool *enabled) |
| Get head pose status. | |
| SonyOzResult | SetPauseHeadPose (SonyOzPlatformId platform_id, SonyOzSessionHandle session, const bool enabled) |
| Enable/Disable head pose tracking.. | |
| SonyOzResult | GetHighImageQuality (SonyOzPlatformId platform_id, SonyOzSessionHandle session, bool *enabled) |
| Get HighImageQuality mode. | |
| SonyOzResult | SetHighImageQuality (SonyOzPlatformId platform_id, SonyOzSessionHandle session, const bool enabled) |
| Set HighImageQuality mode. | |
| SonyOzResult | GetCameraImageSize (SonyOzPlatformId platform_id, SonyOzSessionHandle session, int *width, int *height, int *depth) |
| Get Camera Image size. | |
| SonyOzResult | GetCameraImageBuffer (SonyOzPlatformId platform_id, SonyOzSessionHandle session, size_t *buffer_size, void *buffer) |
| Get Camera Image. | |
| SonyOzResult | GetPerformancePriority (SonyOzPlatformId platform_id, SonyOzSessionHandle session, bool *enable) |
| Get PerformancePriority mode is enabled or not. | |
| SonyOzResult | GetWallmountMode (SonyOzPlatformId platform_id, SonyOzSessionHandle session, bool *enable) |
| Get wallmount mode is enabled or not. | |
| SonyOzResult | SetWallmountMode (SonyOzPlatformId platform_id, SonyOzSessionHandle session, const bool enable) |
| Set wallmount mode is enabled or not. | |
| SonyOzResult sony::oz::xr_runtime::BeginSession | ( | SonyOzSessionHandle | session | ) |
Start a session with the XR Platform.
| [in] | session | Pass session handle. |
The session start process is executed when the session state is RUNNING, and the status of the process can be checked with GetSessionState.(When the session state is RUNNING, it can be determined that the session has started.)
Chrome Tracing Profile is output from the time this function is executed.
This function is guaranteed to work even if it is executed multiple times.
| SonyOzResult sony::oz::xr_runtime::CreateSession | ( | SonyOzPlatformId | platform_id, |
| const SonyOzDeviceInfo * | device, | ||
| RUNTIME_OPTION_BIT_FLAG | runtime_option_bit_flag, | ||
| PLATFORM_OPTION_BIT_FLAG | platform_option_bit_flag, | ||
| SonyOzSessionHandle * | session ) |
Create session with XR Platform.
| [in] | platform_id | Specify the ID of the platform to be used. |
| [in] | device | Pass the information of the device to be used. |
| [in] | runtime_option_bit_flag | Pass the settings flag of runtime (usually RUNTIME_OPTION_IS_XR_CONTENT is specified). |
| [in] | platform_option_bit_flag | Pass the settings flag of platform (usually PLATFORM_OPTION_NONE is specified). |
| [out] | session | A session handle is returned. |
Since information on the device to be used is required to create a session, EnumerateDevices (device enumeration library) to obtain device information.
This function is guaranteed to work even if it is executed multiple times.
If the same device information is passed, the same session is obtained; if different device information is passed, a different session is created.
| SonyOzResult sony::oz::xr_runtime::DestroySession | ( | SonyOzSessionHandle * | session | ) |
Destroy session with XR Platform.
| [in] | session | Pass session handle. |
This function is guaranteed to work even if it is executed multiple times.
| SonyOzResult sony::oz::xr_runtime::EnableStereo | ( | SonyOzSessionHandle | session, |
| bool | enable ) |
Enables/disables stereo rendering.
| [in] | session | Pass the session handle. |
| [in] | enable | true: enable, false: disable. |
Enables/disables stereo rendering.
| SonyOzResult sony::oz::xr_runtime::EndSession | ( | SonyOzSessionHandle | session | ) |
Terminate the session with XR Platform.
| [in] | session | Pass session handle. |
When the session state is RUNNING, the session termination process is executed, and the status of the process can be checked with GetSessionState (even if the session is not RUNNING, it should be processed). (When the session state is READY, it can be determined that the session has terminated.)
If this function is executed multiple times, EndSession should be executed that number of times.
| SonyOzResult sony::oz::xr_runtime::EnumerateDevices | ( | SonyOzPlatformId | platform_id, |
| uint64_t | size, | ||
| SonyOzDeviceInfo * | device_list ) |
Obtain information on available devices.
| [in] | platform_id | Specify the platform ID to be used. |
| [in] | size | Specify array size. |
| [out] | device_list | Device information is set in the array. |
Passing the device information to be used from the acquired device list to CreateSession.
| SonyOzResult sony::oz::xr_runtime::GetCachedPose | ( | SonyOzSessionHandle | session, |
| SonyOzPoseId | pose_id, | ||
| SonyOzPosef * | pose, | ||
| bool * | is_valid ) |
Obtain information about the camera.
| [in] | session | Pass the session handle. |
| [in] | pose_id | Specify the camera to be obtained. |
| [out] | pose | Camera information is returned. |
| [out] | is_valid | Camera information is returned. |
Information such as the viewpoint posture of the specified camera can be acquired.
| SonyOzResult sony::oz::xr_runtime::GetCameraImageBuffer | ( | SonyOzPlatformId | platform_id, |
| SonyOzSessionHandle | session, | ||
| size_t * | buffer_size, | ||
| void * | buffer ) |
Get Camera Image.
| [out] | platform_id | Indicating XR platform. It will always be "Spatial Reality Display" |
| [out] | session | Pass the session handle. |
| [in,out] | buffer_size | Size of prepared buffer. If the call succeeds, the actual size copied is returned. |
| [out] | buffer | Address of the allocated buffer. The memory area must be larger than the size specified by buffer_size. |
Get Camera Image. Camera Image is copied to this buffer.
| SonyOzResult sony::oz::xr_runtime::GetCameraImageSize | ( | SonyOzPlatformId | platform_id, |
| SonyOzSessionHandle | session, | ||
| int * | width, | ||
| int * | height, | ||
| int * | depth ) |
Get Camera Image size.
| [out] | platform_id | Indicating XR platform. It will always be "Spatial Reality Display" |
| [out] | session | Pass the session handle. |
| [out] | width | Width of a captured camera image in pixel. |
| [out] | height | Height of a captured camera image in pxel. |
| [out] | depth | Bytes per pixel. |
Get Camera Image size. Since the size of the camera image is fixed, it is necessary to call only once first to get the size to prepare the buffer.
| SonyOzResult sony::oz::xr_runtime::GetDeviceNum | ( | SonyOzPlatformId | platform_id, |
| uint64_t * | num ) |
Get the number of available devices.
| [in] | platform_id | Specify the platform ID to be used. |
| [out] | num | The number of devices is returned. |
| SonyOzResult sony::oz::xr_runtime::GetDisplaySpec | ( | SonyOzSessionHandle | session, |
| SonyOzDisplaySpec * | display_spec ) |
Obtain information about the display.
| [in] | session | Pass the session handle. |
| [out] | display_spec | Display information is returned. |
Obtain information such as display dimensions, resolution, and tilt.
| SonyOzResult sony::oz::xr_runtime::GetHighImageQuality | ( | SonyOzPlatformId | platform_id, |
| SonyOzSessionHandle | session, | ||
| bool * | enabled ) |
Get HighImageQuality mode.
| [out] | platform_id | Indicating XR platform. It will always be "Spatial Reality Display" |
| [out] | session | Pass the session handle. |
| [in] | enabled | true: HighImageQuality mode is enabled, false: HighImageQuality mode is disabled or not supported. |
Get HighImageQuality mode.
| SonyOzResult sony::oz::xr_runtime::GetPauseHeadPose | ( | SonyOzPlatformId | platform_id, |
| SonyOzSessionHandle | session, | ||
| bool * | enabled ) |
Get head pose status.
| [out] | platform_id | Indicating XR platform. It will always be "Spatial Reality Display" |
| [out] | session | Pass the session handle. |
| [in | enabled true: head pose tracking is stopped, false: head pose is tracking. |
Get head pose status.
| SonyOzResult sony::oz::xr_runtime::GetPerformancePriority | ( | SonyOzPlatformId | platform_id, |
| SonyOzSessionHandle | session, | ||
| bool * | enable ) |
Get PerformancePriority mode is enabled or not.
| [out] | platform_id | Indicating XR platform. It will always be "Spatial Reality Display" |
| [out] | session | Pass the session handle. |
| [in] | enabled | true: PerformancePriority is enabled, false: PerformancePriority is disabled or not supported. |
Get PerformancePriority mode is enabled or not.
| SonyOzResult sony::oz::xr_runtime::GetProjection | ( | SonyOzSessionHandle | session, |
| SonyOzPoseId | pose_id, | ||
| SonyOzProjection * | projection ) |
Obtain Projection.
| [in] | session | Pass the session handle. |
| [in] | pose_id | Specify the camera to be obtained. |
| [out] | projection | Projection is returned. |
Obtain the Projection of the left eye, the right eye, and the respective center point.
| SonyOzResult sony::oz::xr_runtime::GetSessionState | ( | SonyOzSessionHandle | session, |
| SonyOzSessionState * | session_state ) |
Obtain session status.
| [in] | session | Pass the session handle. |
| [out] | session_state | Session status is returned. |
| SonyOzResult sony::oz::xr_runtime::GetTargetMonitorRectangle | ( | SonyOzSessionHandle | session, |
| SonyOzRect * | rect ) |
Obtain information on the target monitor.
| [in] | session | Pass the session handle. |
| [out] | rect | Window information is returned. |
| SonyOzResult sony::oz::xr_runtime::GetWallmountMode | ( | SonyOzPlatformId | platform_id, |
| SonyOzSessionHandle | session, | ||
| bool * | enable ) |
Get wallmount mode is enabled or not.
| [out] | platform_id | Indicating XR platform. It will always be "Spatial Reality Display" |
| [out] | session | Pass the session handle. |
| [in] | enabled | true: wallmount is enabled, false: wallmount mode is disabled or not supported. |
Get wallmount mode is enabled or not.
| SonyOzResult sony::oz::xr_runtime::GetXrSystemError | ( | SonyOzSessionHandle | session, |
| SonyOzXrSystemError * | error ) |
Obtain an error occurred in XR Runtime.
| [in] | session | Pass the session handle. |
| [out] | error | The first error is returned. |
Obtain an error occurred in XR Runtime.
| SonyOzResult sony::oz::xr_runtime::GetXrSystemErrorList | ( | SonyOzSessionHandle | session, |
| uint16_t | num, | ||
| SonyOzXrSystemError * | errors ) |
Obtain errors occurred in XR Runtime.
| [in] | session | Pass the session handle. |
| [in] | num | Pass the list size. |
| [out] | errors | The errors are stored in the list. |
Obtain errors occurred in XR Runtime.
| SonyOzResult sony::oz::xr_runtime::GetXrSystemErrorNum | ( | SonyOzSessionHandle | session, |
| uint16_t * | num ) |
Obtain the number of errors occured in XR Runtime.
| [in] | session | Pass the session handle. |
| [out] | num | The number of errors is returned. |
Obtain the number of errors occured in XR Runtime.
| SonyOzResult sony::oz::xr_runtime::LinkXrLibrary | ( | SonyOzPlatformId | platform_id | ) |
Link the library and make the API available.
| [in] | platform_id | Specify the platform ID to be used. |
| SonyOzResult sony::oz::xr_runtime::SetCameraWindowEnabled | ( | SonyOzPlatformId | platform_id, |
| SonyOzSessionHandle | session, | ||
| const bool | enable ) |
Show/Hide camera window.
| [out] | platform_id | Indicating XR platform. It will always be "Spatial Reality Display" |
| [out] | session | Pass the session handle. |
| [out] | enable | true: show camera window, false: hide camera window. |
Show/Hide camera window.
| SonyOzResult sony::oz::xr_runtime::SetColorSpace | ( | SonyOzSessionHandle | session, |
| int | input_gamma_count, | ||
| int | output_gamma_count, | ||
| float | gamma ) |
| SonyOzResult sony::oz::xr_runtime::SetDebugLogCallback | ( | SonyOzPlatformId | platform_id, |
| SonyOzLogSettings_LogCallback | callback ) |
Change the log output destination to the specified function.
| [in] | platform_id | Specify the platform ID to be used. |
| [in] | callback | Pass the function to be set as the log output destination. |
Registers the log output destination as a callback and outputs the log of this library to an arbitrary location.
| SonyOzResult sony::oz::xr_runtime::SetHighImageQuality | ( | SonyOzPlatformId | platform_id, |
| SonyOzSessionHandle | session, | ||
| const bool | enabled ) |
Set HighImageQuality mode.
| [out] | platform_id | Indicating XR platform. It will always be "Spatial Reality Display" |
| [out] | session | Pass the session handle. |
| [out] | enabled | true: HighImageQuality mode is enabled, false: HighImageQuality mode is disabled or not supported. |
Get HighImageQuality mode.
| SonyOzResult sony::oz::xr_runtime::SetPauseHeadPose | ( | SonyOzPlatformId | platform_id, |
| SonyOzSessionHandle | session, | ||
| const bool | enabled ) |
Enable/Disable head pose tracking..
| [out] | platform_id | Indicating XR platform. It will always be "Spatial Reality Display" |
| [out] | session | Pass the session handle. |
| [out] | enabled | true: Stop head pose tracking, false: Start head pose tracking. |
Enable/Disable head pose tracking.
| SonyOzResult sony::oz::xr_runtime::SetWallmountMode | ( | SonyOzPlatformId | platform_id, |
| SonyOzSessionHandle | session, | ||
| const bool | enable ) |
Set wallmount mode is enabled or not.
| [out] | platform_id | Indicating XR platform. It will always be "Spatial Reality Display" |
| [out] | session | Pass the session handle. |
| [out] | enabled | true: Enable wallmount mode, false: Disable wallmount mode. |
Set wallmount mode is enabled or not.
| SonyOzResult sony::oz::xr_runtime::SubmitD3d11 | ( | SonyOzSessionHandle | session, |
| ID3D11Device * | device, | ||
| ID3D11Texture2D * | side_by_side, | ||
| bool | flip_y_position, | ||
| ID3D11Texture2D * | target ) |
Generate render textures and shaders for D3D11. (single pass)
| [in] | session | Pass the session handle. |
| [in] | device | |
| [in] | side_by_side | Pass a pointer to the SideBySide texture. |
| [in] | flip_y_position | Pass whether to invert the Y axis of the VertexShader. |
| [out] | target | Pass a pointer to the Render Target. |
Generate textures for off-screen rendering and shaders.
| SonyOzResult sony::oz::xr_runtime::SubmitD3d12 | ( | SonyOzSessionHandle | session, |
| ID3D12CommandQueue * | command_queue, | ||
| uint32_t | node_mask, | ||
| ID3D12Resource * | side_by_side, | ||
| bool | flip_y_position, | ||
| DXGI_FORMAT | format, | ||
| ID3D12Resource * | target ) |
Generate render textures and shaders for D3D11. (single pass)
| [in] | session | Pass the session handle. |
| [in] | command_queue | |
| [in] | node_mask | |
| [in] | side_by_side | Pass a pointer to the SideBySide texture. |
| [in] | flip_y_position | Pass whether to invert the Y axis of the VertexShader. |
| [out] | target | Pass a pointer to the Render Target. |
Generate textures for off-screen rendering and shaders.
| SonyOzResult sony::oz::xr_runtime::SubmitMultiPassD3d11 | ( | SonyOzSessionHandle | session, |
| ID3D11Device * | device, | ||
| ID3D11Texture2D * | left, | ||
| ID3D11Texture2D * | right, | ||
| bool | flip_y_position, | ||
| ID3D11Texture2D * | target ) |
Generate D3D11 render textures and shaders for off-screen rendering and shaders. (multi-pass)
| [in] | session | Pass the session handle. |
| [in] | device | |
| [in] | left | Pass a pointer to the left eye texture. |
| [in] | right | Pass a pointer to the right eye texture. |
| [in] | flip_y_position | Pass whether to invert the Y axis of the VertexShader. |
| [out] | target | Pass a pointer to the Render Target. |
Generate textures for off-screen rendering and shaders.
| SonyOzResult sony::oz::xr_runtime::SubmitMultiPassD3d12 | ( | SonyOzSessionHandle | session, |
| ID3D12CommandQueue * | command_queue, | ||
| uint32_t | node_mask, | ||
| ID3D12Resource * | left, | ||
| ID3D12Resource * | right, | ||
| bool | flip_y_position, | ||
| DXGI_FORMAT | format, | ||
| ID3D12Resource * | target ) |
Generate D3D12 render textures and shaders for off-screen rendering and shaders. (multi-pass)
| [in] | session | Pass the session handle. |
| [in] | command_queue | |
| [in] | node_mask | |
| [in] | left | Pass a pointer to the left eye texture. |
| [in] | right | Pass a pointer to the right eye texture. |
| [in] | flip_y_position | Pass whether to invert the Y axis of the VertexShader. |
| [in] | format | |
| [out] | target | Pass a pointer to the Render Target. |
Generate textures for off-screen rendering and shaders.
| SonyOzResult sony::oz::xr_runtime::SubmitMultiPassOpengl | ( | SonyOzSessionHandle | session, |
| unsigned int | left, | ||
| unsigned int | right, | ||
| bool | flip_y_position, | ||
| unsigned int | target ) |
Generate render textures and shaders for D3D11. (single pass)
| [in] | session | Pass the session handle. |
| [in] | left | Pass a pointer to the left eye texture. |
| [in] | right | Pass a pointer to the right eye texture. |
| [in] | flip_y_position | Pass whether to invert the Y axis of the VertexShader. |
| [out] | target | Pass a texture id of the Render Target. |
Generate textures for off-screen rendering and shaders.
| SonyOzResult sony::oz::xr_runtime::SubmitOpengl | ( | SonyOzSessionHandle | session, |
| unsigned int | side_by_side, | ||
| bool | flip_y_position, | ||
| unsigned int | target ) |
Generate render textures and shaders for D3D11. (single pass)
| [in] | session | Pass the session handle. |
| [in] | side_by_side | Pass a texture id of the SideBySide texture. |
| [in] | flip_y_position | Pass whether to invert the Y axis of the VertexShader. |
| [out] | target | Pass a texture id of the Render Target. |
Generate textures for off-screen rendering and shaders.
| void sony::oz::xr_runtime::UnlinkXrLibrary | ( | ) |
Terminate use of XR API and unlink the library.
| SonyOzResult sony::oz::xr_runtime::UpdateTrackingResultCache | ( | SonyOzSessionHandle | session | ) |
Update the cache of tracking data.(for Game Thread)
| [in] | session | Pass the session handle. |